package com.ljc.cjgl.entitiy;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

import org.springframework.data.annotation.CreatedBy;

import com.ljc.cjgl.security.SysUser;
@Entity
public class Stu extends SysUser {
	private String idCard;
	private String sex;
	private String job;
	private String photoName;
	private String saveName; //照片保存名
	private String phone;  //电话
	private String address; //家庭地址
	private String addressPhone; //家庭电话
	private TbClass tbClass;//班级
	
	public Stu(Integer id) {
		super(id);
	}
	
	public Stu() {
		super();
	}

	public String getIdCard() {
		return idCard;
	}
	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getJob() {
		return job;
	}
	public void setJob(String job) {
		this.job = job;
	}
	public String getPhotoName() {
		return photoName;
	}
	public void setPhotoName(String photoName) {
		this.photoName = photoName;
	}
	public String getSaveName() {
		return saveName;
	}
	public void setSaveName(String saveName) {
		this.saveName = saveName;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getAddressPhone() {
		return addressPhone;
	}
	public void setAddressPhone(String addressPhone) {
		this.addressPhone = addressPhone;
	}
	
	@ManyToOne
	@CreatedBy
	public TbClass getTbClass() {
		return tbClass;
	}
	public void setTbClass(TbClass tbClass) {
		this.tbClass = tbClass;
	}
	
	@Transient
	public String getStuNum() {
		return getUsername();
	}
}
